local RankContentBaseRender = app.mvc.createRenderClass(...)

--data =
function RankContentBaseRender.create(node)
    local sprite = RankContentBaseRender.extend(node or cc.CSLoader:createNode(Res.CSRankContentBaseRender))
    if node == nil then
        ccui.Helper:doLayout(sprite)
    end
    sprite:init()
    return sprite
end

function RankContentBaseRender:init(data)
    self.super.init(self, data)
end


function RankContentBaseRender:setRank(rank)
    self._ui.Panel_1:setVisible(rank == 1)
    self._ui.Panel_2:setVisible(rank == 2)
    self._ui.Panel_3:setVisible(rank == 3)
    if rank > 3 then
        self._ui.num:setVisible(true)
        self._ui.num:setString(rank)
    else
        self._ui.num:setVisible(false)
    end
end

function RankContentBaseRender:setIsMy(trueOrFalse)
    if trueOrFalse then
        self._ui["Panel/Panel_bg/bg_my"]:setVisible(true)
        self._ui["Panel/Panel_bg/bg"]:setVisible(false)
    else
        self._ui["Panel/Panel_bg/bg_my"]:setVisible(false)
        self._ui["Panel/Panel_bg/bg"]:setVisible(true)
    end
end

return RankContentBaseRender